﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;

namespace Sustainalytics.ESG.Entities
{
    public class HistoricalData
    {
        [BsonRepresentation(BsonType.Double, AllowTruncation = true)]
        public double? OverallScore { get; set; }

        [BsonRepresentation(BsonType.Double, AllowTruncation = true)]
        public double? OverallPercentile { get; set; }

        [BsonRepresentation(BsonType.Double, AllowTruncation = true)]
        public double? EScore { get; set; }

        [BsonRepresentation(BsonType.Double, AllowTruncation = true)]
        public double? EPercentile { get; set; }

        [BsonRepresentation(BsonType.Double, AllowTruncation = true)]
        public double? SScore { get; set; }

        [BsonRepresentation(BsonType.Double, AllowTruncation = true)]
        public double? SPercentile { get; set; }

        [BsonRepresentation(BsonType.Double, AllowTruncation = true)]
        public double? GScore { get; set; }

        [BsonRepresentation(BsonType.Double, AllowTruncation = true)]
        public double? GPercentile { get; set; }

        public Guid SetId { get; set; }

        public Guid CompanyId { get; set; }

        public Guid Id { get; set; }

        public DateTime Date { get; set; }

        public HistoricalData(DateTime date, Guid companyid)
        {
            Date = new DateTime(date.Year, date.Month, 1, 0, 0, 0, 0, DateTimeKind.Utc);
            CompanyId = companyid;
        }
    }
}
